<%-- 
    Document   : dialog_delete_component
    Created on : 24.03.2014, 11:36:55
    Author     : Corvus 11
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="core" uri="http://java.sun.com/jsp/jstl/core" %>

<div id="dialog_delete_main" class="dialog-content">
<core:if test="${disconnectedEmployee != null}">
    <p><strong>Устройство будет списано с сотрудника: </strong></p>
    <p>${disconnectedEmployee.surnameNamePatronymic}</p>
</core:if>
    
<core:if test="${disconnectedComputer != null}">
    <p><strong>Устройство будет отключено от оборудования: </strong></p>
    <table class="table striped bordered">
        <thead>
            <tr>
                <th>Тип</th>
                <th>Модель</th>
                <th>Номер</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>${disconnectedComputer.componentType.name}</td>
                <td>${disconnectedComputer.description}</td>
                <td>${disconnectedComputer.serial}</td>
            </tr>
        </tbody>
    </table>
</core:if>
    
<core:if test="${disconnectedComponents != null}">
    <p><strong>От устройства будут отключены комплектующие: </strong></p>
    <table class="table striped bordered">
        <thead>
            <tr>
                <th>Тип</th>
                <th>Модель</th>
                <th>Номер</th>
            </tr>
        </thead>
        <tbody>
            <core:forEach items="${disconnectedComponents}" var = "component">
            <tr>
                <td>${component.componentType.name}</td>
                <td>${component.description}</td>
                <td>${component.serial}</td>
            </tr>
            </core:forEach>
        </tbody>
    </table>
</core:if>

<p>Дата списания:</p>
<div id='select_date_div' class='input-control text' data-role='datepicker' data-locale='ru'>
    <input id='select_date_data' type='text'>
    <button type='button' class='btn-date'></button>
</div>
        <button class="button place-right" onclick="removeComponent(${deletedId});">Да</button>
        <button class="button place-right" onclick="$.Dialog.close();">Отменить</button>
</div>